'''
Created on 2013-5-21

@author: Administrator
'''

tables=dict(
          t_replay='''
              CREATE TABLE "r_replay" (
                    "id"  INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
                    "blog"  INTEGER NOT NULL,
                    "content"  TEXT(1000) NOT NULL,
                    "pReplay"  INTEGER,
                    "cTime"  TIMESTEMP NOT NULL DEFAULT (datetime('now','localtime')),
                    "user"  INTEGER NOT NULL,
                    "isDelete"  INTEGER NOT NULL DEFAULT 0
                );
          ''', 
          
          t_user='''
              CREATE TABLE "t_user" (
                    "id"  INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
                    "loginName"  varchar(50) NOT NULL,
                    "password"  varchar(50) NOT NULL,
                    "nickName"  varchar(50) NOT NULL,
                    "userType"  INTEGER NOT NULL,
                    "cTime"  TIMESTAMP NOT NULL DEFAULT (datetime('now','localtime')),
                    "lTime"  TIMESTAMP,
                    "lNum"  INTEGER,
                    "isDelete"  INTEGER NOT NULL DEFAULT 0
                );
          ''' ,
          
          t_blog='''
              CREATE TABLE "t_blog" (
                    "id"  INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
                    "title"  varchar(100) NOT NULL,
                    "content"  TEXT(1000),
                    "user"  INTEGER NOT NULL,
                    "cTime"  TIMESTAMP NOT NULL DEFAULT (datetime('now','localtime')),
                    "isDelete"  INTEGER NOT NULL DEFAULT 0
                );
          '''
          
            )